from daishu_selenium import daishu_Novel
from xigua_selenium import xigua_Novel
from baozou_selenium import baozou_Novel
from haoshuyun_seleinum import haoshuyun_Novel
from qingmi_selenium import qingmi_Novel
from weiyueyun_selenium import weiyueyun_Novel
from yuewei_selenium import yuewei_Novel
from zhangdu_selenium import zhangdu_Novel
import excel_info_sql

list1 = excel_info_sql.getConditions()
for x in range(0, len(list1)):
    # 小说名字
    Novel_name = list1[x]["Novel_name"]
    # 日期
    insert_time = list1[x]["date_time"]
    # 章节
    Chapter = list1[x]["Chapter"]
    # 推广名称
    Extension_name = list1[x]["Extension_name"]
    # 平台名称
    Platform = list1[x]["Platform"]

    if "袋鼠" in Platform:
        daishu_Novel.daishu_selenium(Novel_name, insert_time, Chapter, Extension_name, Platform)
    elif "西瓜" in Platform:
        xigua_Novel.xigua_selenium(Novel_name, insert_time, Chapter, Extension_name, Platform)
    elif "暴走" in Platform:
        baozou_Novel.baozou_selenium(Novel_name, insert_time, Chapter, Extension_name, Platform)
    elif "好书云" in Platform:
        haoshuyun_Novel.haoshuyun_seleinum(Novel_name, insert_time, Chapter, Extension_name, Platform)
    elif "情眯" in Platform:
        qingmi_Novel.qingmi_selenium(Novel_name, insert_time, Chapter, Extension_name, Platform)
    elif "微阅云" in Platform:
        weiyueyun_Novel.weiyueyun_selenium(Novel_name, insert_time, Chapter, Extension_name, Platform)
    elif "阅微" in Platform:
        yuewei_Novel.yuewei_selenium(Novel_name, insert_time, Chapter, Extension_name, Platform)
    elif "掌都" in Platform:
        zhangdu_Novel.zhangdu_selenium(Novel_name, insert_time, Chapter, Extension_name, Platform)
    else:
        pass
